#ifndef HTTPHELPER_H
#define HTTPHELPER_H

#include <QString>
#include <QStringList>
#include <QStringRef>
#include <QRegExp>

namespace FsxWsUtils {

//! Helper around HTTP, URLs, ..
class HttpHelper
{
public:
    //! Query parameter (e.g. &ok=true, ?call=yes) to boolean
    /*! \param parameter Query string
        \return boolean interpretation */
    static const bool parameterToBool(const QString &parameter);
    //! Append parameter to an URL
    /*! \param baseUrl
        \param toBeAppended */
    static const QString appendToUrl(const QString &baseUrl, const QString &toBeAppended);
    //! Remove the query string from an URL
    /*! \param url
        \return url without query string */
    static const QString removeQueryString(const QString &url);
    //! Expand or collapse IP: 127.0.0.1 <=> 127.000.000.001
    /*! \param ip input IP address
        \param expand expand/collapse */
    static const QString formatIPAddress(const QString &ip, bool expand);
};
}
#endif // HTTPHELPER_H
